<!--
 * @Description: 自定义指令
 * @Date: 2022-06-30 10:17:53
 * @LastEditTime: 2022-08-23 18:06:33
 * @FilePath: \vue3\src\views\customInstruction.vue
-->
<template>
  <div class="div-column">
    <input v-model="name1" ref="inputRef1" >
    <input v-model="name2" ref="inputRef2" v-TestAppFocus/>
    <button @click="loseFocus()">input失去焦点</button>
  </div>
</template>
<script setup>
import {getCurrentInstance,ref} from 'vue'
import {vGetFocus} from '../../plugins/getFocus'
const name1 = ref('张三')
const name2 = ref('李四')
const inputRef1 = ref(null)
const inputRef2 = ref(null)
const loseFocus = ()=>{
    console.log(inputRef2.value.blur())
    console.log(inputRef1.value.focus())
}
</script>
<style scoped>

</style>
